package com.controller;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.time.LocalDate;

/**
 * Created by admin on 2017/3/2.
 */
@Controller
@RequestMapping("/hello")
public class HelloController {

    @RequestMapping("/a")
    @ResponseBody
    public String index(){


        return "aasddd";
    }

    @RequestMapping("/b")
    @ResponseBody
    public String a(){
        return  "vvvvvvvv";
    }


    @RequestMapping("/c")
    @ResponseBody
    public String c(){
        return "ccc";
    }


    @RequestMapping("/data/{localDate}")
    @ResponseBody
    public String get(@DateTimeFormat(iso= DateTimeFormat.ISO.DATE)LocalDate localDate){
        return localDate.toString();
    }


}
